package me.zhengjie.minbearwcs.controller.outbound;

import lombok.RequiredArgsConstructor;
import me.zhengjie.minbearwcs.entity.DTO.response.Resp;
import me.zhengjie.minbearwcs.entity.DTO.transfer.Tuple;
import me.zhengjie.minbearwcs.serivce.outbound.OutboundDesktopService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/desktop/outbound")
@RequiredArgsConstructor
public class OutboundTestController {

    private final OutboundDesktopService outboundDesktopService;


    // 测试备货
    @PostMapping("/order/stock/up")
    public Resp stockUpOutbound(@RequestBody List<String> outboundOrderList) {
        Tuple<String> stringTuple = outboundDesktopService.stockUpOutboundTest(outboundOrderList);
        return Resp.build()
                .code(stringTuple.success)
                .reason(stringTuple.value);
    }

}
